package AbstractTransactions

import "SPC/Model"

type ChangeMethodTransaction struct {
	ChangeEmployeeTransaction
	GetMethod func() Model.PaymentMethod
}

func NewChangeMethodTransaction(empid int) *ChangeMethodTransaction {
	n := &ChangeMethodTransaction{
		*NewChangeEmployeeTransaction(empid),
		nil,
	}
	n.ChangeEmployeeTransaction.Change = n.Change
	return n
}

func (c *ChangeMethodTransaction)Change(e Model.Employee){
	pm := c.GetMethod()
	e.SetMethod(pm)
}